package com.mt.course.controller;

import com.mt.common.ServiceResult;
import com.mt.course.api.service.ICourseService;
import com.mt.course.entity.CourseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class CourseController {

    @Autowired
    ICourseService courseService;

    @GetMapping("/course/findInfo")
   public ServiceResult<CourseEntity> findInfo(Map<String, Object> params) {
        return courseService.findInfo(params);
    }

    @PostMapping("/course/doUpdate")
    public ServiceResult<Integer> doUpdate(CourseEntity courseEntity) {
        return courseService.doUpdate(courseEntity);
    }

}
